<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .table-cell {
            display: table-cell;
            vertical-align: middle;
            text-align: center;
            width: 240px;
            height: 180px;
            border:1px solid #666;
        }
        .box{
            width: 100%;
            height: 100%;
        }
    </style>

</head>

<body>

<div class="box" >
    <div class="table-cell">
        <p>我爱你</p>
    </div>
</div>

</body>
</html>